<me:UIEKP   x:Class="WPFExcelReport.TFEKP"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
    xmlns:UserControls="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Controls"
    xmlns:Localization="clr-namespace:Localization;assembly=Localization" 
    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls" 
    xmlns:VF="clr-namespace:WPFExcelReport;assembly=TVAFARBEN" 
    xmlns:WFW="clr-namespace:WPFExcelReport;assembly=TICC_WFEVENTS"
    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
    xmlns:ZB="clr-namespace:WPFExcelReport;assembly=TVKZUAB"  
    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT"  
    xmlns:me="clr-namespace:WPFExcelReport"  
    xmlns:TXT="clr-namespace:WPFExcelReport;assembly=TTXTIND"  
    x:Name="TV"
    Loaded="Window_Loaded"
 >
    <me:UIEKP.Resources>
        <CollectionViewSource   x:Key="vwMaster" />
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:NOTBoolToVisibilityConverter x:Key="nbv"/>
        <ucd:PNumConverter x:Key="pnum"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:NOTConverter  x:Key="not"/>
        <ucd:TextTrimmingConverter  x:Key="trim"/>
        <ucd:PreisConverter  x:Key="price"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UIEKP.Resources>
    <Grid Grid.Row="1" Grid.RowSpan="2"  Grid.Column="0" Grid.ColumnSpan="2" >
        <Grid.RowDefinitions>
            <RowDefinition   Height="Auto" />
            <RowDefinition   Height="1*" />
            <RowDefinition   Height="Auto" />
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0">
            <WrapPanel  >
                <TextBlock Text="{Binding Source={Localization:Translate Word=附加费}}"></TextBlock>
                <CheckBox IsChecked="{Binding IsShowBottom,ElementName=TV}"></CheckBox>
            </WrapPanel>
        </StackPanel>
        <DataGrid Grid.Row="1"  
                AutoGenerateColumns="False" 
                  EnableRowVirtualization="False"   
                  Name="dlgMaster"  IsReadOnly="True"  
                  ItemsSource="{Binding Source={StaticResource vwMaster }}" 
                  HeadersVisibility="Column"  CanUserReorderColumns="True" CanUserResizeRows="True"  
                  RowDetailsVisibilityMode="VisibleWhenSelected" 
                  Width="Auto" Height="Auto"
                  EnableColumnVirtualization="True" HorizontalScrollBarVisibility="Auto"
                  VerticalScrollBarVisibility="Auto">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=LSLIEFNA,Converter={StaticResource gb2312}}"  Header="{Binding Source={Localization:Translate Word=供应商}}" Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=EKPWAEHRSL}" Header="{Binding Source={Localization:Translate Word=外币}}" Width="Auto" MinWidth="30" />
                <DataGridTextColumn Binding="{Binding Path=EKPSA}" Header="{Binding Source={Localization:Translate Word=有效}}" Width="Auto" MinWidth="30" /> 
                <DataGridTextColumn Binding="{Binding Path=EKPAUFKRS}" Header="" Width="Auto"  />
                <DataGridTextColumn Binding="{Binding Path=EKPAUFLFD,Converter={StaticResource ResourceKey=pnum}}" Header="{Binding Source={Localization:Translate Word=采购单}}" Width="Auto"  />
                <DataGridTextColumn Binding="{Binding Path=EKPAUFPOS,Converter={StaticResource ResourceKey=pnum}}" Header="" Width="Auto"  />
                <DataGridTextColumn Binding="{Binding Path=PART}" Header="{Binding Source={Localization:Translate Word=面料}}" Width="Auto" MinWidth="30" />
                <DataGridTextColumn Binding="{Binding Path=PFARBE}" Header="{Binding Source={Localization:Translate Word=色号}}" Width="Auto"   />
                <DataGridTextColumn Binding="{Binding Path=EKPME1,Converter={StaticResource d100}}" Header="{Binding Source={Localization:Translate Word=数量}}" Width="Auto" MinWidth="30" />
                <DataGridTextColumn Binding="{Binding Path=EKPME3,Converter={StaticResource d100}}" Header="{Binding Source={Localization:Translate Word=实收}}" Width="Auto" MinWidth="30" />
                <DataGridTextColumn Binding="{Binding Path=EKPTEXTKON,Converter={StaticResource gb2312}}" Header="{Binding Source={Localization:Translate Word=短/溢}}" Width="60" MinWidth="30" />
                <DataGridTextColumn Binding="{Binding Path=EKPPRME,Converter={StaticResource d1000}}" Header="{Binding Source={Localization:Translate Word=价格}}" Width="Auto" MinWidth="30" />
                <DataGridTextColumn Binding="{Binding Path=EKPMEEH}" Header="{Binding Source={Localization:Translate Word=单位}}" Width="Auto" MinWidth="30" />
                <DataGridTextColumn Binding="{Binding Path=EKPWE1}" Header="{Binding Source={Localization:Translate Word=金额}}" Width="Auto" MinWidth="30" />
                <DataGridTextColumn Binding="{Binding Path=EKPMEEH}" Header="{Binding Source={Localization:Translate Word=单位}}" Width="Auto" MinWidth="30" />
                <DataGridTextColumn Binding="{Binding Path=EKPLTERM}" Header="{Binding Source={Localization:Translate Word=交期}}" Width="80" MinWidth="30" />
                <DataGridTextColumn Binding="{Binding Path=EKPGENDAT1}" Header="{Binding Source={Localization:Translate Word=船样}}" Width="80" MinWidth="30" />
                <DataGridTextColumn Binding="{Binding Path=EKPWEMAIL}" Header="{Binding Source={Localization:Translate Word=确认}}" Width="80" MinWidth="30" />
                <DataGridTextColumn Binding="{Binding Path=EKPSACHB}" Header="{Binding Source={Localization:Translate Word=负责人}}" Width="Auto" MinWidth="30" />
            </DataGrid.Columns>
        </DataGrid>
        <WrapPanel Grid.Row="2" Grid.Column="1">
            <TextBlock  Text="{Binding Source={Localization:Translate Word=更改}}"/>
            <TextBlock  Text="{Binding EKPAENB}"    Width="Auto"/>
            <TextBlock  Text="{Binding EKPAEND}"    Width="Auto"/>
            <TextBlock  Text="{Binding Source={Localization:Translate Word=创建}}"/>
            <TextBlock  Text="{Binding EKPNEUB}"    Width="Auto"/>
            <TextBlock  Text="{Binding EKPNEUD}"    Width="Auto"/>
        </WrapPanel>
    </Grid> 
</me:UIEKP>
